3.492 \(\int \sec ^4(e+f x) (a+b (c \tan (e+f x))^n)^p \, dx\)

Optimal. Leaf size=160 \[ \frac{\tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac{b (c \tan (e+f x))^n}{a}+1\right )^{-p} \text{Hypergeometric2F1}\left (\frac{3}{n},-p,\frac{n+3}{n},-\frac{b (c \tan (e+f x))^n}{a}\right )}{3 f}+\frac{\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac{b (c \tan (e+f x))^n}{a}+1\right )^{-p} \text{Hypergeometric2F1}\left (\frac{1}{n},-p,\frac{1}{n}+1,-\frac{b (c \tan (e+f x))^n}{a}\right )}{f} \]

[Out]

(Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]*(a + b*(c*Tan[e + f*x])^n
)^p)/(f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p) + (Hypergeometric2F1[3/n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)
]*Tan[e + f*x]^3*(a + b*(c*Tan[e + f*x])^n)^p)/(3*f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p)

________________________________________________________________________________________

Rubi [A]  time = 0.130309, antiderivative size = 160, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {3675, 1893, 246, 245, 365, 364} \[ \frac{\tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac{b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac{3}{n},-p;\frac{n+3}{n};-\frac{b (c \tan (e+f x))^n}{a}\right )}{3 f}+\frac{\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac{b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac{1}{n},-p;1+\frac{1}{n};-\frac{b (c \tan (e+f x))^n}{a}\right )}{f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^4*(a + b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]*(a + b*(c*Tan[e + f*x])^n
)^p)/(f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p) + (Hypergeometric2F1[3/n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)
]*Tan[e + f*x]^3*(a + b*(c*Tan[e + f*x])^n)^p)/(3*f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p)

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 1893

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, n, p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n])

Rule 246

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^FracPart[p])/(1 + (b*x^n)/a)^Fr
acPart[p], Int[(1 + (b*x^n)/a)^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 365

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[(a^IntPart[p]*(a + b*x^n)^FracPart[p])
/(1 + (b*x^n)/a)^FracPart[p], Int[(c*x)^m*(1 + (b*x^n)/a)^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[
p, 0] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \sec ^4(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \, dx &=\frac{\operatorname{Subst}\left (\int \left (c^2+x^2\right ) \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}\\ &=\frac{\operatorname{Subst}\left (\int \left (c^2 \left (a+b x^n\right )^p+x^2 \left (a+b x^n\right )^p\right ) \, dx,x,c \tan (e+f x)\right )}{c^3 f}\\ &=\frac{\operatorname{Subst}\left (\int x^2 \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac{\operatorname{Subst}\left (\int \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac{\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac{b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \operatorname{Subst}\left (\int x^2 \left (1+\frac{b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac{\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac{b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \operatorname{Subst}\left (\int \left (1+\frac{b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac{\, _2F_1\left (\frac{1}{n},-p;1+\frac{1}{n};-\frac{b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac{b (c \tan (e+f x))^n}{a}\right )^{-p}}{f}+\frac{\, _2F_1\left (\frac{3}{n},-p;\frac{3+n}{n};-\frac{b (c \tan (e+f x))^n}{a}\right ) \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac{b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f}\\ \end{align*}

Mathematica [A]  time = 1.61931, size = 122, normalized size = 0.76 \[ \frac{\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac{b (c \tan (e+f x))^n}{a}+1\right )^{-p} \left (\tan ^2(e+f x) \text{Hypergeometric2F1}\left (\frac{3}{n},-p,\frac{n+3}{n},-\frac{b (c \tan (e+f x))^n}{a}\right )+3 \text{Hypergeometric2F1}\left (\frac{1}{n},-p,\frac{1}{n}+1,-\frac{b (c \tan (e+f x))^n}{a}\right )\right )}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^4*(a + b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Tan[e + f*x]*(3*Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)] + Hypergeometric2F1[3/
n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]^2)*(a + b*(c*Tan[e + f*x])^n)^p)/(3*f*(1 + (b*(c*T
an[e + f*x])^n)/a)^p)

________________________________________________________________________________________

Maple [F]  time = 0.378, size = 0, normalized size = 0. \begin{align*} \int \left ( \sec \left ( fx+e \right ) \right ) ^{4} \left ( a+b \left ( c\tan \left ( fx+e \right ) \right ) ^{n} \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x)

[Out]

int(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (\left (c \tan \left (f x + e\right )\right )^{n} b + a\right )}^{p} \sec \left (f x + e\right )^{4}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")

[Out]

integrate(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^4, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (\left (c \tan \left (f x + e\right )\right )^{n} b + a\right )}^{p} \sec \left (f x + e\right )^{4}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")

[Out]

integral(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^4, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**4*(a+b*(c*tan(f*x+e))**n)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (\left (c \tan \left (f x + e\right )\right )^{n} b + a\right )}^{p} \sec \left (f x + e\right )^{4}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")

[Out]

integrate(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^4, x)